﻿#include "ITCatTableRow.h"
#include "ITCatTableControl.h"
#include "ITCatTableCell.h"

ITCatTableRow::ITCatTableRow(ITCatTableControl* pTable):m_pTable(pTable),cells()
{
	//继承上一层的属性
	const std::map<ITCatTablePropertiesEnum, DWORD> &properties = m_pTable->GetProperties();
	this->SetProperties(properties);

	this->height = GetProperty(ITCatTablePropertiesEnum::ROW_HEIGHT);

	// 生成和表格列数一致的空单元格
	size_t colCount = m_pTable->columns.size();
	for (size_t i = 0; i < colCount; ++i) {
		cells.push_back(std::make_unique<ITCatTableCell>(this));
	}
}
